#!/bin/bash -e
# 
# File: check-letter.sh
# Purpose: check letter
#

LETTER=$1
ERROR=1
if [ -n "$LETTER" ] ; then
    regex="^[A-Za-z]+$"
    ckStep2=`echo $1 | egrep $regex | wc -l`
    if [ $ckStep2 -eq 0 ]
    then
       echo [WARN] "The string $LETTER is not a correct string!!!";
       ERROR=1;
    else
       ERROR=0;
    fi
else
    echo [WARN] 'please enter a letter.'
    ERROR=2;
fi
exit $ERROR

